home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2118 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.5 KB

  1. Path: grafix.xs4all.nl!john.hendrikx
  2. Date: Wed, 24 Jan 96 20:42:38 GMT+1
  3. Newsgroups: comp.sys.amiga.programmer
  4. Distribution: world
  5. Subject: Re: Demo/game to OS friendly part II
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=iso-8859-1
  8. Content-Transfer-Encoding: 8bit
  9. From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
  10. Message-ID: <john.hendrikx.48xr@grafix.xs4all.nl>
  11. Organization: Grafix Attack BBS Holland
  12.  
  13. In a message of 23 Jan 96 Mjp3783@alpha.isc.rit.e wrote to all:
  14.  
  15.  Mai> All of these "discussions" of OS functionality remind me of a
  16.  Mai> conversation that happened here a long time ago. A group of asm
  17.  Mai> programmers were discussing the fastest way to copy memory from one
  18.  Mai> location to another. After 2-3 weeks, they finally had a piece of code
  19.  Mai> for everyone to see. (For those interested, it moved all of the
  20.  Mai> registers to the stack, copied 14-15 registers at a time, then replaced
  21.  Mai> the stack and all of its variables)
  22.  
  23. That's interesting, on my setup however the Movem loop is not the fastest way
  24. to copy (but that's not the issue).  The most interesting result from my test
  25. however was that turning off DataCache on my 68030/22 had a dramatic increase
  26. in copying performance:
  27.  
  28. Testresults - Mar 21 1995
  29.  
  30.   Using a Movem-loop 200990 bytes/frame (PAL machine, 12 registers used,
  31.   unrolled 3 times)
  32.   (9.58 MB/sec, AIBB tells me 9.5-9.8 MB/sec)
  33.  
  34.   Using a 48 times unrolled Move.l-loop 212353 bytes/frame
  35.   (10.1 MB/sec)
  36.  
  37. Now with datacache off (!):
  38.  
  39.   Using a 48 times unrolled Move.l-loop 242323 bytes/frame
  40.   (11.6 MB/sec)
  41.  
  42. The Movem loop wasn't the most optimized version possible, but I doubt it would
  43. have made much difference.
  44.  
  45. (All tests done on a 68030/22 MHz, 60ns 32-bit FastRAM. Source and destination
  46. were not overlapping.  During tests interrupts and all DMA was disabled)
  47.  
  48. Can anybody explain what is happening with the DataCaching?  According to my
  49. tests ChipRAM access also becomes faster with DataCache off.
  50.  
  51.  Mai> Mike Sinz (I think - maybe Radell
  52.  Mai> Jessup) replied to the message and stated that that was almost
  53.  Mai> instruction for instruction what the OS does. You can take this one of
  54.  Mai> two ways:
  55.  
  56. Then why is there this CopyMemQuicker patch if the OS already uses the
  57. "fastest" way of copying?
  58.  
  59.  Mai> 1) K0derz are as smart as the OS designers and don't need an OS,
  60.  Mai> anyway
  61.  
  62. It would be silly to assume that there is no-one out there who can program
  63. ASM/C whatever better than the OS-designers.
  64.  
  65. It also depends on how much time you want to spend on such a subject as
  66. whatever you come up with you'll find that the ideal solution depends on the
  67. processor.  On 68000's it would be safe to assume a Movem loop is faster as it
  68. requires much less instruction fetches.  On 68030 and up instruction-fetches
  69. are of little importance as they can be in the cache.
  70.  
  71.  Mai> 2) OS designers have some vague clue what optimization is, might be
  72.  Mai> doing something right and don't need a bunch of snot nosed brats who
  73.  Mai> can't deal with any rules to tell them that they don't know the jobs
  74.  Mai> they are being well compensated for.  
  75.  
  76. They often haven't got the time to bother with silly issues like how to copy
  77. mem fastest, so if they don't always come up with the fastest results then they
  78. must have considered it unimportant or of no great impact to overall system
  79. speed.
  80.  
  81. Grtz John
  82.  
  83. -----------------------------------------------------------------------
  84.  John.Hendrikx@grafix.xs4all.nl   TextDemo/FastView/Etc... development
  85. -----------------------------------------------------------------------
  86. -- Via Xenolink 1.985B3, XenolinkUUCP 1.1
  87.